package com.sc.servlet.admin.fieldbook;

import com.sc.services.UserServices;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @description: 拒绝预约审核
 * @author: sc
 * @create: 2023-01-05 15:49
 **/
@WebServlet("/refuseBookFieldId")
public class refuseBookFieldIdServlet extends HttpServlet {

    private UserServices userServices = new UserServices();

    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {


        String refuseBookField = request.getParameter("fieldbookid");
        userServices.refuseBookState(refuseBookField);

        response.setContentType("text/json;charset=utf-8");
        response.getWriter().write("refuse_suc");


    }

    @Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        this.doGet(request, response);
    }
}